<?php if(isset($data)): ?>
    <ul class="user_panel">
        <li>
            <a href="#"><img style="width: 30px;" src="<?php echo Yii::app()->baseUrl; ?>/images/avatar/<?php echo $data['avatar_url'] ?>" /> Xin chào <?php echo $data['name']; ?>! <span class="arrow"></span></a>
            <ul>
                <li><a href="<?php echo Yii::app()->baseUrl;?>/chinh-sua-thong-tin">Chỉnh sửa thông tin cá nhân</a></li>
                <li><a href="<?php echo Yii::app()->baseUrl; ?>/dang-xuat">Thoát</a></li>
            </ul>
            <a class="facebook" href="https://www.facebook.com/xachdo.vn" target="_blank">Facebook</a>
        </li>
    </ul>
<?php else : ?>
    <a href="<?php echo Yii::app()->createAbsoluteUrl('dang-nhap');?>">Đăng nhập</a>
    <a href="<?php echo Yii::app()->createAbsoluteUrl('dang-ky');?>">Đăng ký</a></li>
    <a class="facebook" href="https://www.facebook.com/xachdo.vn" target="_blank">Facebook</a>
<?php endif; ?>